import 'package:xin_nuo_pda/bean/mlot_entity.dart';

mlotEntityFromJson(MlotEntity data, Map<String, dynamic> json) {
	if (json['MLOTID'] != null) {
		data.mLOTID = json['MLOTID'].toString();
	}
	if (json['MLOTTYPE'] != null) {
		data.mLOTTYPE = json['MLOTTYPE'].toString();
	}
	if (json['MAINQTY'] != null) {
		data.mAINQTY = json['MAINQTY'] is String
				? int.tryParse(json['MAINQTY'])
				: json['MAINQTY'].toInt();
	}
	if (json['STATE'] != null) {
		data.sTATE = json['STATE'].toString();
	}
	if (json['HOLDSTATE'] != null) {
		data.hOLDSTATE = json['HOLDSTATE'].toString();
	}
	if (json['MATERIALNAME'] != null) {
		data.mATERIALNAME = json['MATERIALNAME'].toString();
	}
	if (json['MATERIALVERSION'] != null) {
		data.mATERIALVERSION = json['MATERIALVERSION'].toString();
	}
	if (json['MATERIALDESC'] != null) {
		data.mATERIALDESC = json['MATERIALDESC'].toString();
	}
	if (json['MATERIALTYPE'] != null) {
		data.mATERIALTYPE = json['MATERIALTYPE'].toString();
	}
	if (json['PARTNERCODE'] != null) {
		data.pARTNERCODE = json['PARTNERCODE'].toString();
	}
	if (json['LOTCOMMENT'] != null) {
		data.lOTCOMMENT = json['LOTCOMMENT'].toString();
	}
	if (json['UOMID'] != null) {
		data.uOMID = json['UOMID'].toString();
	}
	if (json['SHELFLIFEEXPIRE'] != null) {
		data.sHELFLIFEEXPIRE = json['SHELFLIFEEXPIRE'].toString();
	}
	if (json['FLOORLIFEEXPIRE'] != null) {
		data.fLOORLIFEEXPIRE = json['FLOORLIFEEXPIRE'].toString();
	}
	return data;
}

Map<String, dynamic> mlotEntityToJson(MlotEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['MLOTID'] = entity.mLOTID;
	data['MLOTTYPE'] = entity.mLOTTYPE;
	data['MAINQTY'] = entity.mAINQTY;
	data['STATE'] = entity.sTATE;
	data['HOLDSTATE'] = entity.hOLDSTATE;
	data['MATERIALNAME'] = entity.mATERIALNAME;
	data['MATERIALVERSION'] = entity.mATERIALVERSION;
	data['MATERIALDESC'] = entity.mATERIALDESC;
	data['MATERIALTYPE'] = entity.mATERIALTYPE;
	data['PARTNERCODE'] = entity.pARTNERCODE;
	data['LOTCOMMENT'] = entity.lOTCOMMENT;
	data['UOMID'] = entity.uOMID;
	data['SHELFLIFEEXPIRE'] = entity.sHELFLIFEEXPIRE;
	data['FLOORLIFEEXPIRE'] = entity.fLOORLIFEEXPIRE;
	return data;
}